import {
	apiResquest
} from '../utils/http.js'

// 添加关注
export const addFocus = (data) => {
	return apiResquest({
		url: '/member/enterprise/attention',
		method: 'POST',
		query: data,
		power: 1
	})
}

// 取消关注
export const delFocus = (data) => {
	return apiResquest({
		url: '/member/enterprise/attention',
		method: 'DELETE',
		query: data,
		power: 1
	})
}

// 该企业是否被当前用户关注了
export const judgeFocus = (data) => {
	return apiResquest({
		url: '/member/enterprise/hasattention?enterpriseName=' + data,
		method: 'GET',
		power: 1
	})
}

//是否是VIP会员
export const vipInfo = () => {
	return apiResquest({
		url: '/member/mp/checkvip',
		method: 'GET',
		power: 1
	})
}

// 获取用户信息
export const getUserInfo = () => {
	return apiResquest({
		url: '/member/mp/userinfo',
		method: 'GET',
		power: 1
	})
}

// 查询企业详情
export const getDetail = (data) => {
	return apiResquest({
		url: '/enterprise/potential/detail?name='+data,
		method: 'GET',
		power: 1
	})
}
